﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using Frogism.Core;
namespace Frogism.Data {
  public class AuthorLoader :LoaderUpdateBase<Author,IAuthor>{
    protected override IAuthor GetEmptyObject() {
      return       new Author();
    }
    protected override void FillObject(IAuthor a , FriendlyReader reader) {
      a.Name = reader.String("Name");
    }

    protected override string ProcNameGetAll {
      get { return "AuthorGetAll"; }
    }

    protected override string ProcNameGetById {
      get { return "AuthorGetById"; }
    }

    protected override void FillParameters(System.Data.SqlClient.SqlCommand cmd, IAuthor Obj) {
      AddStringParam(cmd, "Name", Obj.Name);
    }

    protected override string ProcNameSave {
      get { throw new NotImplementedException(); }
    }

    protected override string ProcNameCreate {
      get { return "AuthorInsert"; }
    }

    protected override string ProcNameDelete {
      get { throw new NotImplementedException(); }
    }
  }
}
